package android.itv.view;

import android.app.Activity;
import android.itv.R;
import android.itv.controller.NotificationController;
import android.itv.library.Database;
import android.os.Bundle;
import android.widget.ListView;
import android.widget.TextView;

public class ViewNotifications extends Activity
{
    ListView listView;
    TextView textView;
    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.viewnotifications);
        
        listView=(ListView)findViewById(R.id.listView1);
        textView=(TextView)findViewById(R.id.txtTotalNotifications);
        
        //countNotifications
        Database db=new Database(this);
        int count=db.countNotifications();
        textView.setText(textView.getText()+" "+count);        
        NotificationController controller=new NotificationController(this);
        controller.loadListNotificationToView(this, listView,textView);
    }
}
